Skip to content

Conversation

mspirkov
Copy link
Contributor

@mspirkov mspirkov commented Oct 8, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

/**
* Creates the URL rules that should be contained within this composite rule.
* @return UrlRuleInterface[] the URL rules
* @return UrlRuleInterface[]|UrlRuleInterface[][] the URL rules
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@mspirkov mspirkov marked this pull request as ready for review October 8, 2025 13:05
Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

/**
* Creates the URL rules that should be contained within this composite rule.
* @return UrlRuleInterface[] the URL rules
* @return UrlRuleInterface[]|UrlRuleInterface[][] the URL rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is in the structure with additional array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an array of the form array<string, UrlRuleInterface[]>. It contains several sets of rules grouped by URL name.

$rules[$urlName][] = $this->createRule($pattern, $prefix, $controller . '/' . $action);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is always like that or UrlRuleInterface[] is valid as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UrlRuleInterface[] is valid as well

$rule = Yii::createObject(array_merge($this->ruleConfig, $rule));
if (!$rule instanceof UrlRuleInterface) {
throw new InvalidConfigException('URL rule class must implement UrlRuleInterface.');
}
$rules[] = $rule;
}
return $rules;

@mspirkov mspirkov requested a review from samdark October 13, 2025 07:03
@samdark samdark merged commit dcb88b8 into yiisoft:master Oct 13, 2025
94 checks passed
@samdark
Copy link
Member

samdark commented Oct 13, 2025

Thank you!

1 similar comment
@samdark
Copy link
Member

samdark commented Oct 13, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants